home *** CD-ROM | disk | FTP | other *** search
- On 03-apr-97 Jamie B wrote:
-
- >Okay, I'm not going to brag on about anything... All I want to know
- >is how to use normaly inputs and take "BITS" from it, and make it
- >NON case sensative...
- >
- > So if I took say this:
- >
- > Eat the cow
- >
- > And the cow didn't exist, it should say:
- >
- > There is no cow to eat.
-
- Split the input into words, using Instr() to find the spaces.
-
- Your parser must know about 'eat' and 'the' of course.
-
- Compare 'cow' with the list of possible nouns. If it is not there, print the
- message (i.e. Print "There is no ";NOUN$;" to eat").
-
- If you are making a text adventure, you might as well take a look at the
- several adventure development systems there are. A whole bunch of them can be
- found at ftp://ftp.gmd.de/if-archive/.
-
- > I don't know ho to do that normally...
- > Also: Case sensetive etc:
- >
- > I want this:
- >
- > HELLO
- >
- > To be the same as this:
- >
- > HeLlO
- >
- > (No case discrimination)...
-
- Have the test words in memory in upper case only. So:
- VERB$(1) = "EAT"
- VERB$(2) = "HELLO"
- VERB$(3) = "NORTH", etc.
-
- Now, before you test, convert the input to uppercase:
-
- UPIN$ = Upper$(IN$)
-
- Hello, HEllO, HELLO, hello, etc. will all be converted to uppercase and can so
- be tested against the list of test words.
-
- -----
- Branko Collin http://www.xs4all.nl/~collin
- collin@xs4all.nl http://www.kun.nl/undans/members/branko.htm
- "Erm... Erm... should I say something interesting now?"
- - Branko Collin -
-
-
-